The Tab View Component > FTabView.getSelectedIndex() |
FTabView.getSelectedIndex()
Availability
Flash Player 6.
Usage
myTab_tbv.getSelectedIndex ()
Parameters
none
Returns
Returns a number indicating the index of the currently selected tab.
Description
Returns a number indicating the index of the currently selected tab.
Example
The following code adds three tabs to the components, sets the second tab as selected, and the traces the selected index value.
myTab_tbv.addItem( "Tab1" ); myTab_tbv.addItem( "Tab2" ); myTab_tbv.addItem( "Tab3" ); myTab_tbv.setSelectedIndex( 1 ); //selects the second item trace( "Index: " + myTab_tbv.getSelectedIndex( ) ); //traces "Index: 1"
See also